package com.hsj.goldstore.utils;

import android.content.Context;
import android.widget.Toast;

import com.hsj.goldstore.base.BaseApplication;

/**
 * Created by Administrator on 2018/3/21.
 */

public class Helper {

    public static Toast sToast;

    /**
     * @param context 用于显示toast
     * @param msg     消息
     */
    public static void showToast(Context context, String msg) {
        if (null != sToast) {
            sToast.cancel();
        }
        sToast = Toast.makeText(context, msg, Toast.LENGTH_LONG);
        sToast.show();

    }

//    /**
//     *
//     * @param msg 消息
//     */
//    public static void showToast( String msg) {
//        showToast(BaseApplication.mContext, msg);
//    }
}
